<!--
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2023-09-27 17:43:02
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-10-22 09:42:01
 * @FilePath: \mould\src\components\BehaViorManage\feedbackListText\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

<template>
  <!-- 小弹框 width:500,height:0.3,top:15%  -->
  <!-- 中弹框 width:800,height:0.5,top:10% -->
  <!-- 大弹框 width:1060,height:0.76,top:5% -->

  <div
    class="Control-1 mechanism_dialogS closure"
    id="comcn small tableInfoBox"
  >
    <el-dialog
      width="1060px"
      title="请选择WBS数据"
      :visible.sync="visible"
      @close="closeDialog1"
      :append-to-body="true"
      top="5%"
    >
      <div
        class="dialogBody common commonClassDialog moduleDialogs"
        :style="{ height: dialogHeight }"
        style="width: 100%; display: flex; flex-direction: column"
      >
        <div class="tab">
          <div
            v-for="(data, index) in typeData"
            :key="data.value"
            @click="changeType($event, index)"
          >
            <div
              class="btn"
              :style="{
                color: data.show === true ? 'rgba(0, 117, 255, 1)' : '#343639',
                background: data.show === true ? '#E0EFFF' : '#fff',
              }"
            >
              {{ data.text }}
            </div>
          </div>
        </div>
        <div
          v-if="typeData[0].show"
          style="display: flex; flex-direction: column; flex: 1"
        >
          <el-form ref="form" :model="getLists" label-width="110px">
            <el-row :gutter="20">
              <el-col :span="6"
                ><el-form-item label="项目标段：">
                  <el-select
                    class="selectBhz"
                    v-model="getLists.secId"
                    placeholder="所有标段"
                    @change="selectCompanyid"
                  >
                    <el-option
                      v-for="(options, sIndex) in tendersObj"
                      :key="sIndex"
                      :label="options.fItemName"
                      :value="options.fItemValue"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
          <div style="height: 530px">
            <el-table
              ref="multipleTable"
              :data="tableData_Wbs"
              style="width: 100%"
              height="100%"
              lazy
              :load="treeLoad"
              :tree-props="{
                children: 'children',
                hasChildren: 'IsLeaf',
              }"
              row-key="NodeId"
              v-loading="loading"
              element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.2)"
              :row-class-name="tableRowClassName"
              border
              stripe
              highlight-current-row
              @current-change="handleCurrentChange"
              @selection-change="handleSelectionChange"
            >
              <el-table-column
                fixed
                type="index"
                label="序号"
                width="50"
                align="center"
              ></el-table-column>
              <el-table-column type="selection" width="55"> </el-table-column>
              <el-table-column
                prop="Name"
                label="工程部位"
                min-width="200"
                style="display: flex"
              >
                <template slot-scope="scope">
                  <a href="javascript:;" :title="scope.row.Name">
                    {{ scope.row.Name }}
                  </a>
                </template>
              </el-table-column>

              
             
            
           
              <el-table-column
                prop="ProjectType"
                label="层次类型"
                align="center"
              
              >
                <template slot-scope="scope">
                  <a href="javascript:;" :title="scope.row.ProjectType">
                    {{ scope.row.ProjectType }}
                  </a>
                </template>
              </el-table-column>

              <el-table-column
                prop="WbsStructureType"
                label="结构类型"
                align="center"
               
              >
                <template slot-scope="scope">
                  <a href="javascript:;" :title="scope.row.WbsStructureType">
                    {{ scope.row.WbsStructureType }}
                  </a>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div
          v-if="typeData[1].show"
          style="display: flex; flex-direction: column; flex: 1"
        >
          <el-form ref="form" :model="getLists" label-width="110px">
            <el-row :gutter="20">
              <el-col :span="6"
                ><el-form-item label="项目标段：">
                  <el-select
                    class="selectBhz"
                    v-model="getList.secId"
                    placeholder="所有标段"
                    @change="selectCompanyid"
                  >
                    <el-option
                      v-for="(options, sIndex) in tendersObj"
                      :key="sIndex"
                      :label="options.fItemName"
                      :value="options.fItemValue"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="单位工程:">
                  <el-input
                    type="text"
                    placeholder="单位工程"
                    v-model="getList.unitKey"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="具体部位:">
                  <el-input
                    type="text"
                    placeholder="具体部位"
                    v-model="getList.partKey"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-button type="primary" @click="getParts(getList)"
                  >查询</el-button
                >

                <!-- <el-button type="primary" :loading="editLoading" @click="yj_searchForm(getList)">查询</el-button> -->
              </el-col>
            </el-row>
          </el-form>
          <div style="height: 500px; overflow-y: auto">
            <el-table
            
              :data="tableData"
              tooltip-effect="dark"
              style="width: 100%"
              v-loading="loadingPart"
              element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.2)"
              @selection-change="handleSelectionChange1"
              border
              stripe
              highlight-current-row
            >
              <el-table-column
                fixed
                type="index"
                label="序号"
                width="50"
                :index="hIndex"
                align="center"
              >
              <!-- <template slot-scope="scope">
            <span>{{(getList.pageIndex - 1) * getList.pageSize + scope.$index + 1}}</span>
       </template> -->
            <!-- (this.getList.pageIndex - 1) * this.getList.pageSize + 1; -->
            
            </el-table-column>
            <el-table-column
      type="selection"
      width="55">
    </el-table-column>
              <el-table-column label="工程部位" prop="Name">
                <template slot-scope="scope">
                  <a href="javascript:;" :title="scope.row.Name">
                    {{ scope.row.Name }}
                  </a>
                </template>
              </el-table-column>

              <el-table-column
                prop="ProjectType"
                label="层次类型"
                align="center"
                
              >
                <template slot-scope="scope">
                  <a href="javascript:;" :title="scope.row.ProjectType">
                    {{ scope.row.ProjectType }}
                  </a>
                </template>
              </el-table-column>
              <el-table-column
                prop="WbsStructureType"
                label="结构类型"
                align="center"
                
              >
                <template slot-scope="scope">
                  <a href="javascript:;" :title="scope.row.WbsStructureType">
                    {{ scope.row.WbsStructureType }}
                  </a>
                </template>
              </el-table-column>
            </el-table>
         
          </div>
          <div style="height:30px" v-if="tableData.length!=0">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChanges"
              :current-page="getList.pageIndex"
              :page-sizes="[10, 20, 30, 40]"
              :page-size="getList.pageSize"
              layout="total, prev, pager, next, jumper"
              :total="queryCriteriaData"
            >
            </el-pagination>
          </div>
          <div></div>
        </div>
        <div style="height: 150px">已选择：{{ selectText }}</div>
      </div>
      <div style="height: 40px"></div>
      <div class="newlyAdded_btn" v-if="btnShow">
        <el-button :disabled="isLock" type="primary" @click="yj_saveForm(1)"
          >保存</el-button
        >
        <el-button type="warning" @click="visible = false">关闭</el-button>
      </div>
    </el-dialog>
    <messageBox
      :showMsgBox="showMsgBox"
      :msgTip="msgTip"
      :msgType="msgType"
      @confirmMsg="confirmMsg"
      @confirmMsgs="confirmMsgs"
    ></messageBox>
  </div>
</template>

<script src="./index.js"></script>
<style lang="less" scoped>
@import "./index.less";
</style>
